<template>
    <el-row>
      <el-col :xs="12" :sm="6" :md="4" :lg="3" :xl="6" v-for="item in list" :key="item.activityId">
        <el-card :body-style="{ padding: '5px' }">
          <img :src="item.activityImg" class="image">
          <div class="div-content">
            <span>{{item.activityName}}</span>
            <div class="bottom clearfix">
              <time class="time">{{ item.currentDate }}</time>
              <time class="num">{{item.tookNumber + ' / ' + item.limitNumber}}</time>
                <el-button type="text" class="button " @click="todetail(activityId)">查看详情</el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
</template>

<script>
export default {
    name: 'ListContent',
    props: {
      list: Array
    },
    methods: {
      todetail(activityId) {
        this.$router.push('/detail/'+activityId)
      }
    }
}
</script>

<style scoped>
  .time {
    font-size: 13px;
    color: #999;
    }
  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }
  .button {
    float: right;
  }
  .image {
    width: 100%;
    display: block;
  }
  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .clearfix:after {
    clear: both
  }
  .num {
    float: right;
    font-size: 13px;
    color: #999;
  }
  .div-content {
    padding: 14px 14px 0 14px;
  }
</style>